package com.joysuch.wwyt.list.enums;

import com.joysuch.wwyt.core.enums.FileConvertStates;

public enum ListBizState {
    DRAFT(0, "草稿"), PUBLISH(1, "发布");

    private Integer code;
    private String name;

    ListBizState(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return this.name;
    }
    public Integer getCode() {
        return this.code;
    }

    public static String findNameByCode(Integer code) {
        if (code == null) {
            return null;
        }
        ListBizState[] values = ListBizState.values();
        for (ListBizState s : values) {
            if (s.code == code.intValue()) {
                return s.getName();
            }
        }
        return null;
    }
}
